package com.itheima.service;

import com.itheima.bean.Student;
import com.itheima.mapper.impl.StudentMapperImpl;
import com.itheima.service.impl.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    StudentMapperImpl  studentMapper =new StudentMapperImpl();

    @Override
    public List<Student> selectAll() {
       return studentMapper.selectAll();
    }

    @Override
    public Student selectStuById(Integer id) {
        return studentMapper.selectById(id);
    }

    @Override
    public Integer insert(Student stu) {
        return studentMapper.insert(stu);
    }

    @Override
    public Integer update(Student stu) {
        return studentMapper.update(stu);
    }

    @Override
    public Integer delete(Integer id) {
        return studentMapper.delete(id);
    }
}
